﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HighDiveAdmin.Resources;

namespace HighDiveAdmin.Engine
{
    /// <summary>
    /// The class Person is a data class that holds data about a person.
    ///A person can be either a judge or a diver (not both within the same competition).
    /// </summary>
    public abstract class Person
    {
        #region Properties
        /// <summary>
        /// DatabasId
        /// </summary>
        public int?  PersonDbId { get; set; }
        public string IdNumber { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public Gender Gender { get; set; }
        public string Club { get; set; }
        public string Email { get; set; }
        public string Address { get; set; }

        #endregion

        #region Constructors

        protected Person()
        {

        }

        /// <summary>
        /// Creates a new person. Club and email can be omitted.
        /// </summary>
        protected Person(string idNumber, string firstName, string lastName, Gender gender, string address, string club = null,
            string email = null)
        {
            IdNumber = idNumber;
            FirstName = firstName;
            LastName = lastName;
            Gender = gender;
            Address = address;
            Club = club;
            Email = email;
            PersonDbId = -1;
        }

        #endregion
    }
}
